# encoding: utf-8

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
#   Mayor.create(:name => 'Daley', :city => cities.first)

group1 = Group.create([{:name=>'admin',:description=>'Administrator'}])
group2 = Group.create([{:name=>'operator',:description=>'Operator'}])

branch1 = Branch.create([{:code=>'001',:name=>'สำนักงานใหญ่'}])
branch2 = Branch.create([{:code=>'002',:name=>'ท่าใหม่'}])

admin = User.create([{:login=>'admin',:password=>'1234',:password_confirmation=>'1234',:group_id=>group1.first.id,:branch_id=>branch1.first.id,:language=>'en'}])
pong = User.create([{:login=>'pong',:password=>'1234',:password_confirmation=>'1234',:group_id=>group1.first.id,:branch_id=>branch1.first.id,:language=>'en'}])
user1 = User.create([{:login=>'user1',:password=>'1234',:password_confirmation=>'1234',:group_id=>group2.first.id,:branch_id=>branch2.first.id,:language=>'en'}])
user2 = User.create([{:login=>'user2',:password=>'1234',:password_confirmation=>'1234',:group_id=>group2.first.id,:branch_id=>branch2.first.id,:language=>'en'}])
user3 = User.create([{:login=>'user3',:password=>'1234',:password_confirmation=>'1234',:group_id=>group2.first.id,:branch_id=>branch2.first.id,:language=>'en'}])

model16 = Model.create([{:name=>'Administrator',:code=>'A000'}])
model1 = Model.create([{:name=>'User',:code=>'A001'}])
model2 = Model.create([{:name=>'Group',:code=>'A002'}])
model3 = Model.create([{:name=>'Branch',:code=>'A003'}])
model4 = Model.create([{:name=>'Model',:code=>'A004'}])
model5 = Model.create([{:name=>'Permission',:code=>'A005'}])
model6 = Model.create([{:name=>'Authentication',:code=>'A006'}])
model8 = Model.create([{:name=>'Audit',:code=>'A007'}])
model9 = Model.create([{:name=>'Entry',:code=>'A008'}])

model10 = Model.create([{:name=>'Title',:code=>'S001'}])
model11 = Model.create([{:name=>'Card',:code=>'S002'}])
model12 = Model.create([{:name=>'Nationality',:code=>'S003'}])
model13 = Model.create([{:name=>'Province',:code=>'S004'}])
model14 = Model.create([{:name=>'Occupation',:code=>'S005'}])

model7 = Model.create([{:name=>'Customer',:code=>'C001'}])
model15 = Model.create([{:name=>'Agreement',:code=>'C002'}])



permission1 = Permission.create([{:name=>'Manage User',:description=>'Create Read Update and Destroy User',:code=>'1',:model_id=>model1.first.id}])
permission2 = Permission.create([{:name=>'Manage Group',:description=>'Create Read Update and Destroy Group',:code=>'2',:model_id=>model2.first.id}])
permission3 = Permission.create([{:name=>'Manage Branch',:description=>'Create Read Update and Destroy Branch',:code=>'3',:model_id=>model3.first.id}])
permission4 = Permission.create([{:name=>'Manage Model',:description=>'Create Read Update and Destroy Model',:code=>'4',:model_id=>model4.first.id}])
permission5 = Permission.create([{:name=>'Manage Permission',:description=>'Create Read Update and Destroy Permission',:code=>'5',:model_id=>model5.first.id}])
permission6 = Permission.create([{:name=>'Manage Authentication',:description=>'Create Read Update and Destroy Authentication',:code=>'6',:model_id=>model6.first.id}])
permission7 = Permission.create([{:name=>'Manage Customer',:description=>'Create Read Update and Destroy Customer',:code=>'7',:model_id=>model7.first.id}])
permission8 = Permission.create([{:name=>'Manage Audit',:description=>'Create Read Update and Destroy Audit',:code=>'8',:model_id=>model8.first.id}])
permission9 = Permission.create([{:name=>'Manage Entry',:description=>'Create Read Update and Destroy Entry',:code=>'9',:model_id=>model9.first.id}])
permission10 = Permission.create([{:name=>'Manage Title',:description=>'Create Read Update and Destroy Title',:code=>'10',:model_id=>model10.first.id}])
permission11 = Permission.create([{:name=>'Manage Card',:description=>'Create Read Update and Destroy Card',:code=>'11',:model_id=>model11.first.id}])
permission12 = Permission.create([{:name=>'Manage Nationality',:description=>'Create Read Update and Destroy Nationality',:code=>'12',:model_id=>model12.first.id}])
permission13 = Permission.create([{:name=>'Manage Province',:description=>'Create Read Update and Destroy Province',:code=>'13',:model_id=>model13.first.id}])
permission14 = Permission.create([{:name=>'Manage Occupation',:description=>'Create Read Update and Destroy Occupation',:code=>'14',:model_id=>model14.first.id}])
permission15 = Permission.create([{:name=>'Manage Agreement',:description=>'Create Read Update and Destroy Agreement',:code=>'15',:model_id=>model15.first.id}])
permission16 = Permission.create([{:name=>'Access Administrator',:description=>'Access administrator menu',:code=>'16',:model_id=>model16.first.id}])

authentication_admin_1 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission1.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_2 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission2.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_3 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission3.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_4 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission4.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_5 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission5.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_6 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission6.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_7 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission7.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_8 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission8.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_9 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission9.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_10 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission10.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_11 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission11.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_12 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission12.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_13 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission13.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_14 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission14.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_15 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission15.first.id,:can_read=>true,:can_create=>true,:can_update=>true,:can_destroy=>true}])
authentication_admin_16 = Authentication.create([{:group_id=>group1.first.id,:permission_id=>permission16.first.id,:can_read=>true,:can_create=>false,:can_update=>false,:can_destroy=>false}])

authentication_operation_1 = Authentication.create([{:group_id=>group2.first.id,:permission_id=>permission1.first.id,:can_read=>true,:can_create=>false,:can_update=>false,:can_destroy=>false}])

title1 = Title.create([{:name=>'นาย'}])
title2 = Title.create([{:name=>'นาง'}])
title3 = Title.create([{:name=>'น.ส.'}])
title4 = Title.create([{:name=>'ดร.'}])
title5 = Title.create([{:name=>'ผศ.'}])

card1 = Card.create([{:name=>'บัตรประจำตัวประชาชน'}])
card2 = Card.create([{:name=>'ใบอนุญาตขับรถ'}])
card3 = Card.create([{:name=>'บัตรประจำตัวข้าราชการ'}])
card4 = Card.create([{:name=>'บัตรต่างด้าว'}])
card5 = Card.create([{:name=>'หนังสือเดินทาง'}])

nationality1 = Nationality.create([{:name=>'ไทย'}])
nationality2 = Nationality.create([{:name=>'กัมพูชา'}])
nationality3 = Nationality.create([{:name=>'ลาว'}])
nationality4 = Nationality.create([{:name=>'พม่า'}])
nationality5 = Nationality.create([{:name=>'มาเลเซีย'}])

province1 = Province.create([{:name=>'จันทบุรี'}])
province2 = Province.create([{:name=>'ระยอง'}])
province3 = Province.create([{:name=>'ตราด'}])
province4 = Province.create([{:name=>'สระแก้ว'}])
province5 = Province.create([{:name=>'ชลบุรี'}])

occupation1 = Occupation.create([{:name=>'พนักงานบริษัท'}])
occupation2 = Occupation.create([{:name=>'ตำรวจ'}])
occupation8 = Occupation.create([{:name=>'ทหาร'}])
occupation3 = Occupation.create([{:name=>'ครู'}])
occupation4 = Occupation.create([{:name=>'พยาบาล'}])
occupation5 = Occupation.create([{:name=>'หมอ'}])
occupation6 = Occupation.create([{:name=>'ทำสวน'}])
occupation7 = Occupation.create([{:name=>'ค้าขาย'}])
occupation8 = Occupation.create([{:name=>'ประมง'}])

# customer code format example 2011-001-00001,2011-001-00002
customer1 = Customer.create([{:code=>'',:title_id=>title1.first.id,:first_name=>"ลูกค้า01",:last_name=>"นามสกุลทดสอบ01",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น01",:nationality_id=>nationality1.first.id,:card_no=>'1229900026558',:card_id=>card1.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province1.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ01',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์01',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation1.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ01',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 001',:work_start=>Time.mktime(2006,4,1),:work_salary=>10000.00 ,:other_income=>0.00,:black_list=>false,:rate=>1,:contact_address=>'',:branch_id=>branch1.first.id}])
customer2 = Customer.create([{:code=>'',:title_id=>title2.first.id,:first_name=>"ลูกค้า02",:last_name=>"นามสกุลทดสอบ02",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น02",:nationality_id=>nationality2.first.id,:card_no=>'1229900026558',:card_id=>card2.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province2.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ02',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์02',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation2.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ02',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 002',:work_start=>Time.mktime(2006,4,1),:work_salary=>20000.00 ,:other_income=>1000.00,:black_list=>false,:rate=>2,:contact_address=>'',:branch_id=>branch2.first.id}])
customer3 = Customer.create([{:code=>'',:title_id=>title3.first.id,:first_name=>"ลูกค้า03",:last_name=>"นามสกุลทดสอบ03",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น03",:nationality_id=>nationality3.first.id,:card_no=>'1229900026558',:card_id=>card3.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province3.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ03',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์03',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation3.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ03',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 003',:work_start=>Time.mktime(2006,4,1),:work_salary=>30000.00 ,:other_income=>2000.00,:black_list=>false,:rate=>3,:contact_address=>'',:branch_id=>branch1.first.id}])
customer4 = Customer.create([{:code=>'',:title_id=>title4.first.id,:first_name=>"ลูกค้า04",:last_name=>"นามสกุลทดสอบ04",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น04",:nationality_id=>nationality4.first.id,:card_no=>'1229900026558',:card_id=>card4.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province4.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ04',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์04',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation4.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ04',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 004',:work_start=>Time.mktime(2006,4,1),:work_salary=>40000.00 ,:other_income=>3000.00,:black_list=>false,:rate=>4,:contact_address=>'',:branch_id=>branch2.first.id}])
customer5 = Customer.create([{:code=>'',:title_id=>title5.first.id,:first_name=>"ลูกค้า05",:last_name=>"นามสกุลทดสอบ05",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น05",:nationality_id=>nationality5.first.id,:card_no=>'1229900026558',:card_id=>card5.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province5.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ05',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์05',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation5.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ05',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 005',:work_start=>Time.mktime(2006,4,1),:work_salary=>50000.00 ,:other_income=>4000.00,:black_list=>false,:rate=>5,:contact_address=>'',:branch_id=>branch1.first.id}])
customer6 = Customer.create([{:code=>'',:title_id=>title1.first.id,:first_name=>"ลูกค้า06",:last_name=>"นามสกุลทดสอบ06",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น06",:nationality_id=>nationality1.first.id,:card_no=>'1229900026558',:card_id=>card1.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province1.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ06',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์01',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation1.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ06',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 006',:work_start=>Time.mktime(2006,4,1),:work_salary=>60000.00 ,:other_income=>5000.00,:black_list=>false,:rate=>1,:contact_address=>'',:branch_id=>branch2.first.id}])
customer7 = Customer.create([{:code=>'',:title_id=>title2.first.id,:first_name=>"ลูกค้า07",:last_name=>"นามสกุลทดสอบ07",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น07",:nationality_id=>nationality2.first.id,:card_no=>'1229900026558',:card_id=>card2.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province2.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ07',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์02',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation2.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ07',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 007',:work_start=>Time.mktime(2006,4,1),:work_salary=>70000.00 ,:other_income=>6000.00,:black_list=>false,:rate=>2,:contact_address=>'',:branch_id=>branch1.first.id}])
customer8 = Customer.create([{:code=>'',:title_id=>title3.first.id,:first_name=>"ลูกค้า08",:last_name=>"นามสกุลทดสอบ08",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น08",:nationality_id=>nationality3.first.id,:card_no=>'1229900026558',:card_id=>card3.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province3.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ08',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์03',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation3.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ08',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 008',:work_start=>Time.mktime(2006,4,1),:work_salary=>80000.00 ,:other_income=>7000.00,:black_list=>false,:rate=>3,:contact_address=>'',:branch_id=>branch2.first.id}])
customer9 = Customer.create([{:code=>'',:title_id=>title4.first.id,:first_name=>"ลูกค้า09",:last_name=>"นามสกุลทดสอบ09",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น09",:nationality_id=>nationality4.first.id,:card_no=>'1229900026558',:card_id=>card4.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province4.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ09',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์04',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation4.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ09',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 009',:work_start=>Time.mktime(2006,4,1),:work_salary=>90000.00 ,:other_income=>8000.00,:black_list=>false,:rate=>4,:contact_address=>'',:branch_id=>branch1.first.id}])
customer10 = Customer.create([{:code=>'',:title_id=>title5.first.id,:first_name=>"ลูกค้า10",:last_name=>"นามสกุลทดสอบ10",:birth_date=>Time.mktime(1984,7,11),:nick_name=>"ชื่อเล่น10",:nationality_id=>nationality5.first.id,:card_no=>'1229900026558',:card_id=>card5.first.id ,:marr_status=>'Single',:issue_by=>'กระทรวงมหาดไทย',:issue_province=>province5.first.id,:issue_date=>Time.mktime(2001,4,4),:issue_expire=>Time.mktime(2012,7,10),:register_address=>'ที่อยู่ทดสอบ10',:register_tel_no=>'039123456',:register_home_live=>Time.mktime(1984,7,11),:register_home_position=>'ผู้อาศัย',:register_home_characteristic=>'บ้านเดี่ยว',:register_home_near=>'',:present_address=>'อพาร์ทเมนท์05',:present_tel_no=>'0811324567',:present_home_live=>Time.mktime(2010,3,1),:present_home_position=>'ผู้อาศัย',:present_home_characteristic=>'อพาร์ทเมนท์',:present_home_near=>'',:occupation_id=>occupation5.first.id,:work_position=>'พนักงานประจำ',:work_name=>'บริษัททดสอบ10',:work_address=>'ลาดพร้าว',:work_tel_no=>'021234567 ต่อ 010',:work_start=>Time.mktime(2006,4,1),:work_salary=>100000.00 ,:other_income=>9000.00,:black_list=>false,:rate=>5,:contact_address=>'',:branch_id=>branch2.first.id}])



